<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>user list</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="<%=path%>/css/demo.css" type="text/css">
	<link rel="stylesheet" href="<%=path%>/css/table.css" type="text/css">
	<script type="text/javascript" src="/RMS/js/jquery.js"></script>
	<script type="text/javascript" src="/RMS/js/user/list.js"></script>
	
  </head>
  
  <body>
    <div style="text-aglin;center ;position: absolute;left: 260px;top: 20px;" id="userManager">
     	用户管理 <span id="addUser" onclick=""><a href="javascript:void(0)">添加用户</a></span><br>
 	 
    	<table width="653" height="40" id="mytable">
    		<thead>
    			<tr>
    				<th>用户ID</th>
    				<th>用户名</th>
    				<th>描述</th>
    				<th>操作</th>
    			</tr>
    		</thead>
    		<tbody>
    			<s:if test="userList!=null">
    				<s:iterator value="userList" status="index">
    					<tr>
    						<td><s:if test="userId==null || userId=='' ">--</s:if><s:else><s:property value="userId"/></s:else></td>
    						<td><s:if test="userName==null || userName=='' ">--</s:if><s:else><s:property value="userName"/></s:else></td>
    						<td><s:if test="userDesc==null || userDesc=='' ">--</s:if><s:else><s:property value="userDesc"/></s:else></td>
    						<td><a href="javascript:void(0)" id="findUpdate" name="<s:property value="userId"/>">修改</a><a href="javascript:void(0)" id="delete" name="<s:property value="userId"/>">删除</a></td>
    					</tr>
    				</s:iterator>
    			</s:if>
    		</tbody>
    		 
    	</table>
    </div>
    <div id="add" style="text-aglin:center ;position: absolute;left: 260px;top: 20px;">
	    <form action="main/user/addUser" method="post">
	   	 添加用户
	    <table>
	    	<tbody>
	    		<tr><th>用户名：</th><td><input type="text" name="user.userName" id="userName" onchange="" onblur="validateU(this.value)"/></td></tr>
	    		<tr><th>密      码：</th><td><input type="password" name="user.password" id="password" onblur="validateP(this.value)"/></td></tr>
	    		<tr><th>确认密码：</th><td><input type="password" name="" id="confrimPassword" onblur="validateC(this.value)"/></td></tr>
	    		<tr><th>描      述：</th><td><textarea name="user.userDesc" style="height:100px;width:200px" onblur="validateD(this.value)"></textarea></td></tr>
	    		<%--<tr><th>状      态：</th><td><input type="radio" name="user.status"  value="1"/></td></tr>
	    		--%><%--<tr><td>添加角色：</td><s:select list="roleList" listKey="roleId" listValue="roleName" headerValue="--请选角色类型--" headerKey="0" name="roleId"/></tr>--%>
	    		<tr><s:checkboxlist label="添加角色" list="roleList" listKey="roleId" listValue="roleName"  name="roleIdArray" cssStyle=""/></tr>
	    		<tr><th>操      作：</th><td style="padding-left:100px"><input type="submit" id="submit" value="增加"><input type="button" id="cancel" value="取消"></td></tr>
	    	</tbody>
	    </table>
	    </form>
    </div>
    <%--<s:debug></s:debug>
    --%></body>
</html>
